import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import './index.less';

import FootTabBar from 'COMPONENT/FootTabBar';
import CommonHeader from 'COMPONENT/CommonHeader';
import {Icon,Button,List, Checkbox, Flex} from 'antd-mobile'
import {Link} from 'react-router'


const CheckboxItem = Checkbox.CheckboxItem;
const AgreeItem = Checkbox.AgreeItem;
const FlexItem = Flex.Item;

export default class Home extends React.Component {
  static contextTypes = {
    router: PropTypes.object.isRequired
  }
  constructor(props) {
    super(props);

  }

  componentWillMount() {
    //获取token
  }

  toAgreement=()=>{
    this.context.router.push({
        pathname: '/RentHouse/LeaseInformation'
      })
  }

  render() {
    let height = $(window).height()-50
    return(
        <div >
            <CommonHeader name='协议确认'  leftContentTitle="@back"/>
            <div className='agreement' style={{paddingBottom:'1rem'}}>
                <img src="./imgs/xieyi.png" alt="" width='100%'/>
                <Flex>
                  <FlexItem>
                    <AgreeItem data-seed="logId" onChange={e => console.log('checkbox', e)}>
                      我已阅读并同意 <a style={{color:'blue'}}>《租房服务协议》</a>
                    </AgreeItem>
                  </FlexItem>
                </Flex>

            </div>

            {/*<div className='confirmFoot' onClick={this.toAgreement.bind(this)}>我承诺</div>*/}
            <div className="btnGroup-one-fixed">
                <Button type="primary" className="btnGroup-one-fixed-btn"
                        onClick={this.toAgreement.bind(this)}>我承诺</Button>
            </div>

        </div>
    )
  }

}